package com.itheima.Exception;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ExceptionDemo1 {
    public static void main(String[] args) throws ParseException {
        method();
    }

    private static void method() throws ParseException {
        String s = "2020年10月28日";
        SimpleDateFormat sdf  = new SimpleDateFormat("yyyy年MM月dd日");
        Date parse = sdf.parse(s);
        System.out.println(parse);
    }
}
